package com.ad_hccm.dao.Appendix;

import com.ad_hccm.domain.Appendix.EASI;
import com.ad_hccm.domain.VitalSigns.VitalSigns;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * TODO EASI
 */
@Mapper
public interface EASIDao {
    @Insert("insert into easi value(#{id}, #{week}, #{areaHead}, #{areaUpperLimb}, #{areaTrunk}, #{areaLowerLimb}, #{erythemaHead}, #{erythemaUpperLimb}, #{erythemaTrunk}, #{erythemaLowerLimb}, #{edemaHead}, #{edemaUpperLimb}, #{edemaTrunk}, #{edemaLowerLimb}, #{scalyScalesHead}, #{scalyScalesUpperLimb}, #{scalyScalesTrunk}, #{scalyScalesLowerLimb}, #{mossyTransformationHead}, #{mossyTransformationUpperLimb}, #{mossyTransformationTrunk}, #{mossyTransformationLowerLimb})")
    public boolean save(EASI domain);

    @Update("update easi set areaHead = #{areaHead}, areaUpperLimb = #{areaUpperLimb}, areaTrunk = #{areaTrunk}, areaLowerLimb = #{areaLowerLimb}, erythemaHead = #{erythemaHead}, erythemaUpperLimb = #{erythemaUpperLimb}, erythemaTrunk = #{erythemaTrunk}, erythemaLowerLimb = #{erythemaLowerLimb}, edemaHead = #{edemaHead}, edemaUpperLimb = #{edemaUpperLimb}, edemaTrunk = #{edemaTrunk}, edemaLowerLimb = #{edemaLowerLimb}, scalyScalesHead = #{scalyScalesHead}, scalyScalesUpperLimb = #{scalyScalesUpperLimb}, scalyScalesTrunk = #{scalyScalesTrunk}, scalyScalesLowerLimb = #{scalyScalesLowerLimb}, mossyTransformationHead = #{mossyTransformationHead}, mossyTransformationUpperLimb = #{mossyTransformationUpperLimb}, mossyTransformationTrunk = #{mossyTransformationTrunk}, mossyTransformationLowerLimb = #{mossyTransformationLowerLimb} where id=#{id} and week = #{week}")
    public boolean update(EASI domain);

    @Select("select * from easi where id=#{id}")
    public List<EASI> getById(String id);

    @Select("select * from easi")
    public List<EASI> getAll();
}
